<?php


use Phinx\Seed\AbstractSeed;

class CitySeeder extends AbstractSeed
{
    /**
     * Run Method.
     *
     * Write your database seeder using this method.
     *
     * More information on writing seeders is available here:
     * https://book.cakephp.org/phinx/0/en/seeding.html
     */
    public function run(): void
    {
        $data = [
            [
                'name' => '瑞安',
                'code' => 'ruian',
                'status' => 1,
                'created_at' => time(),
                'updated_at' => time(),
            ],
            [
                'name' => '温州',
                'code' => 'wenzhou',
                'status' => 1,
                'created_at' => time(),
                'updated_at' => time(),
            ],
        ];

        $exec = $this->table('city');
        $exec->insert($data)
            ->save();
    }
}
